package com.tuanzi.loan.business.service.family;

import com.tuanzi.loan.business.entity.family.ProductInfo;
import com.tuanzi.loan.business.entity.family.ProductManyHeadInfo;
import com.tuanzi.loan.business.entity.family.ProductTongdunManyHead;
import com.tuanzi.loan.core.service.BaseAuditService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.ProductInfoSearchRequest;
import com.tuanzi.loan.vo.response.family.ProductInfoSearchResponse;
import com.tuanzi.loan.vo.view.family.product.ProductInfoView;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * @author Ray 2017/09/21
 */
public interface ProductInfoService extends BaseAuditService<ProductInfo, Long> {

	ProductInfoView loadProductInfoView(Long productInfoId);

	ProductInfoView saveOrUpdateProductInfoView(ProductInfoView view, ProductManyHeadInfo manyHeadInfo, List<ProductTongdunManyHead> tongdunManyHeads);

	Page<ProductInfoSearchResponse> list(PageSearcher<ProductInfoSearchRequest> pageSearcher);

	List<ProductInfoSearchResponse> listAllUnionProductInfos();

	void online(ProductInfo productInfo);

	void online(List<ProductInfo> productInfos);

	void offline(List<ProductInfo> productInfos);

	void offline(ProductInfo productInfo);

	List<ProductInfo> listAllProductInfo();

	List<ProductInfo> listAllProductInfoByStatus(Integer status);

	List<ProductInfo> listAllProductInfoByCompanyId(Long companyId);

	ProductInfo findProductInfoByName(String name);

    Page<ProductInfoSearchResponse> getApilist(PageSearcher<ProductInfoSearchRequest> pageSearcher);
    
    Long copyProductInfo(Long productInfoId);

}
